#include "Label.h"
#include "UIRender.h"
#include "Theme.h"

tstring Label::GetClassName()
{
	return _T("label");
}

bool Label::OnInit()
{
	Control::OnInit();
	return true;
}

void Label::OnDestroy()
{
	Control::OnDestroy();
}

void Label::Draw()
{
	Control::Draw();
	Theme::ITheme* theme = Theme::CustomTheme::GetInstance();
	glLineWidth(3);
	UIRender::DrawFillRect(pos.x, pos.y, size.x, size.y, theme->GetBackColor());
	UIRender::DrawString(pos, "Label");
	UIRender::DrawEdgeRect(pos.x, pos.y, size.x, size.y, theme->GetBorderColor());
}

void Label::Resize(int w, int h)
{
	Control::Resize(w, h);
}

